#!/usr/bin/env python
# -*- coding: utf-8 -*-
#coding=utf8

# 本文件由自动工具 proto.py 自动生成，请勿修改
# filename msg18000_csbuf.py
# package ptl

from ptl.base_csbuf import *


# message Req18001
class Req18001:
	def __init__(self):
		self.protoid = 18001
		self.playerId = 0
		self.type = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint8(self.type, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.type = reader.getUint8(2)
# message Resp18001
class Resp18001:
	def __init__(self):
		self.protoid = 18001
		self.acts = []
		self.status = 0

	def Marshal(writer):
		countacts = len(self.acts)
		writer.setArray(countacts, 1)
		for i in range(countacts):
			writer.setMessage(0)
			self.acts[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.status, 2)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = SavenActivity() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.acts.append(msg)
		self.status = reader.getUint32(2)
# message Req18002
class Req18002:
	def __init__(self):
		self.protoid = 18002
		self.playerId = 0
		self.date = 0

	def Marshal(writer):
		writer.setUint32(self.playerId, 1)
		writer.setUint32(self.date, 2)

	def Unmarshal( reader):
		self.playerId = reader.getUint32(1)
		self.date = reader.getUint32(2)
# message Resp18002
class Resp18002:
	def __init__(self):
		self.protoid = 18002
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
# message Req18010
class Req18010:
	def __init__(self):
		self.protoid = 18010
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp18010
class Resp18010:
	def __init__(self):
		self.protoid = 18010
		self.signs = ""

	def Marshal(writer):
		writer.setString(self.signs, 1)

	def Unmarshal( reader):
		self.signs = reader.getString(1)
# message Req18011
class Req18011:
	def __init__(self):
		self.protoid = 18011
		self.day = 0

	def Marshal(writer):
		writer.setUint16(self.day, 1)

	def Unmarshal( reader):
		self.day = reader.getUint16(1)
# message Resp18011
class Resp18011:
	def __init__(self):
		self.protoid = 18011
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
# message Req18020
class Req18020:
	def __init__(self):
		self.protoid = 18020
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp18020
class Resp18020:
	def __init__(self):
		self.protoid = 18020
		self.activitys = []

	def Marshal(writer):
		countactivitys = len(self.activitys)
		writer.setArray(countactivitys, 1)
		for i in range(countactivitys):
			writer.setMessage(0)
			self.activitys[i].Marshal(writer)
			writer.endSetMessage()

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = Activity() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.activitys.append(msg)
# message Req18021
class Req18021:
	def __init__(self):
		self.protoid = 18021
		self.activity_id = 0

	def Marshal(writer):
		writer.setUint32(self.activity_id, 1)

	def Unmarshal( reader):
		self.activity_id = reader.getUint32(1)
# message Resp18021
class Resp18021:
	def __init__(self):
		self.protoid = 18021
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
# message Req18025
class Req18025:
	def __init__(self):
		self.protoid = 18025
		pass

	def Marshal(writer):
		pass

	def Unmarshal( reader):
		pass
# message Resp18025
class Resp18025:
	def __init__(self):
		self.protoid = 18025
		self.activitys = []
		self.createT = 0

	def Marshal(writer):
		countactivitys = len(self.activitys)
		writer.setArray(countactivitys, 1)
		for i in range(countactivitys):
			writer.setMessage(0)
			self.activitys[i].Marshal(writer)
			writer.endSetMessage()
		writer.setUint32(self.createT, 2)

	def Unmarshal( reader):
		for i in range(reader.getArray(1)):
			msg = Activity7() 
			reader.getMessage(0)
			msg.Unmarshal(reader)
			reader.endGetMessage()
			self.activitys.append(msg)
		self.createT = reader.getUint32(2)
# message Req18026
class Req18026:
	def __init__(self):
		self.protoid = 18026
		self.activity_id = 0

	def Marshal(writer):
		writer.setUint32(self.activity_id, 1)

	def Unmarshal( reader):
		self.activity_id = reader.getUint32(1)
# message Resp18026
class Resp18026:
	def __init__(self):
		self.protoid = 18026
		self.status = 0

	def Marshal(writer):
		writer.setUint32(self.status, 1)

	def Unmarshal( reader):
		self.status = reader.getUint32(1)
